{% extends "articulos/base.html" %}
{% load i18n %}
         
{%block content%}  
        <form method="GET">
        	<h1><center>Ensamblado</center></h1>
             <ul>
             	<table>
             		<tr>
             			<td><h2>Nombre:	{{ ensamblado.nombre }}</h2></td>
             			<td></td>
             			<td><h2>Descripción:		{{ ensamblado.descripcion }}</h2></td>
             			<td></td>
             		</tr>
             	</table>
             	{% if partes %}
				<table cellpadding="15px">
					<tr>
					<td><h3>Artículo		</h3></td>
					<td></td>
					<td></td>
					<td><h3>Cantidad</h3></td>
					</tr>
				{% endif %}
				<br />
				<br />
				{% for item in partes %}
					<tr>
					<td>	{{ item.articulo }}	</td>
					<td></td>
					<td></td>
					<td>	{{ item.cantidad }}	</td>
					<td></td>
					<td></td>
					<td><input type="button" value="Borrar" onclick="location.href='/wal/articulos/ensamblados/partes/borrar/{{item.id}}/'"/></td>
					</tr>
				{% endfor %}
				</table>
			 </ul>
        </form>
        <br />
				<br />
				<br />
				<br />
       	<form method="POST">
       		<ul>
       			<table cellpadding="10px">
       				{% csrf_token %}
       				<tr>
       					{% for field in detalle_forms %}
       						{% if field.label != '  Peso' %}
       							<td><h3>{{ field.label }}</h3></td>
       						{% endif %}
       					{% endfor %}
       				</tr>
       				<tr>
	       				{% for field in detalle_forms %}
	       					{% if field.label != '  Peso' %}
			   					<td>{{ field }}</td>
			   				{% endif %}
						{% endfor %}
						<td><input type="submit" class="find_link" value="Guardar" /></td>
					</tr>
					<tr>
	       				{% for field in detalle_forms %}
	       					{% if field.label != '  Peso' %}
			   					<td>{{ field.errors }}</td>
			   				{% endif %}
						{% endfor %}
					</tr>
       			</table>
       		</ul>
       	</form>
{%endblock%}
